package com.bango.nokia.java;

import org.json.me.JSONObject;

class BangoProfile
{
	private int _profileId;

	private int _sdkType;
	private String _sdkVersion;
	private String _applicationId;
	private String _applicationType;
	private String _applicationChannel;
	private String _applicationVersion;
	private String _userId;
	private int _connectionType;
	private boolean _isRoaming;
	private String _locationSource;
	private double _locationAltitude;
	private double _locationLatitude;
	private double _locationLongitude;
	private float _locationAccuracy;
	private int _sessionRestartTime;
	private String _operator;
	private String _operatorName;
	private String _operatorCountryIso;
	private String _brand;
	private String _device;
	private String _model;
	private String _product;
	private String _version;
	private String _buildId;
	private String _operatorConnectionType;
	private String _simOperator;
	private boolean _profilePosted = false;

	void ProfileId(int profileId)
	{
		_profileId = profileId;
	}

	void SdkType(int sdkType)
	{
		_sdkType = sdkType;
	}

	void SdkVersion(String sdkVersion)
	{
		_sdkVersion = sdkVersion;
	}

	void ApplicationId(String applicationId)
	{
		_applicationId = applicationId;
	}

	void ApplicationType(String applicationType)
	{
		_applicationType = applicationType;
	}

	void ApplicationChannel(String applicationChannel)
	{
		_applicationChannel = applicationChannel;
	}

	void ApplicationVersion(String applicationVersion)
	{
		_applicationVersion = applicationVersion;
	}

	void UserId(String userId)
	{
		_userId = userId;
	}

	void SessionRestartTime(int sessionRestartTime)
	{
		_sessionRestartTime = sessionRestartTime;
	}

	void ConnectionType(int connectionType)
	{
		_connectionType = connectionType;
	}

	void IsRoaming(boolean isRoaming)
	{
		_isRoaming = isRoaming;
	}

	void LocationSource(String locationSource)
	{
		_locationSource = locationSource;
	}

	void LocationAltitude(double locationAltitude)
	{
		_locationAltitude = locationAltitude;
	}

	void LocationLatitude(double locationLatitude)
	{
		_locationLatitude = locationLatitude;
	}

	void LocationLongitude(double locationLongitude)
	{
		_locationLongitude = locationLongitude;
	}

	void LocationAccuracy(float locationAccuracy)
	{
		_locationAccuracy = locationAccuracy;
	}

	void Operator(String operator)
	{
		_operator = operator;
	}

	void OperatorName(String operatorName)
	{
		_operatorName = operatorName;
	}

	void OperatorCountryIso(String operatorCountryIso)
	{
		_operatorCountryIso = operatorCountryIso;
	}

	void SimOperator(String simOperator)
	{
		_simOperator = simOperator;
	}

	void Brand(String brand)
	{
		_brand = brand;
	}

	void Device(String device)
	{
		_device = device;
	}

	void Model(String model)
	{
		_model = model;
	}

	void Product(String product)
	{
		_product = product;
	}

	void Version(String version)
	{
		_version = version;
	}

	void BuildId(String buildId)
	{
		_buildId = buildId;
	}

	void OperatorConnectionType(String operatorConnectionType)
	{
		_operatorConnectionType = operatorConnectionType;
	}

	void ProfilePosted(boolean profilePosted)
	{
		_profilePosted = profilePosted;
	}

	int ProfileId()
	{
		return _profileId;
	}

	int SdkType()
	{
		return _sdkType;
	}

	String SdkVersion()
	{
		return _sdkVersion;
	}

	String ApplicationId()
	{
		return _applicationId;
	}

	String ApplicationType()
	{
		return _applicationType;
	}

	String ApplicationChannel()
	{
		return _applicationChannel;
	}

	String ApplicationVersion()
	{
		return _applicationVersion;
	}

	String UserId()
	{
		return _userId;
	}

	int SessionRestartTime()
	{
		return _sessionRestartTime;
	}

	int ConnectionType()
	{
		return _connectionType;
	}

	boolean IsRoaming()
	{
		return _isRoaming;
	}

	String LocationSource()
	{
		return _locationSource;
	}

	double LocationAltitude()
	{
		return _locationAltitude;
	}

	double LocationLatitude()
	{
		return _locationLatitude;
	}

	double LocationLongitude()
	{
		return _locationLongitude;
	}

	float LocationAccuracy()
	{
		return _locationAccuracy;
	}

	String Operator()
	{
		return _operator;
	}

	String OperatorName()
	{
		return _operatorName;
	}

	String OperatorCountryIso()
	{
		return _operatorCountryIso;
	}

	String SimOperator()
	{
		return _simOperator;
	}

	String Brand()
	{
		return _brand;
	}

	String Device()
	{
		return _device;
	}

	String Model()
	{
		return _model;
	}

	String Product()
	{
		return _product;
	}

	String Version()
	{
		return _version;
	}

	String BuildId()
	{
		return _buildId;
	}

	String OperatorConnectionType()
	{
		return _operatorConnectionType;
	}

	boolean ProfilePosted()
	{
		return _profilePosted;
	}

	BangoProfile()
	{

	}

	BangoProfile(int sdkType, String sdkVersion, String applicationId, String applicationType, String applicationChannel, String applicationVersion, String userId, int sessionRestartTime, int connectionType, boolean isRoaming, String locationSource, double locationAltitude, double locationLatitude, double locationLongitude, float locationAccuracy, String operator, String operatorName, String operatorCountryIso, String simOperator, String brand, String device, String model, String product, String version, String buildId, String operatorConnectionType)
	{
		_sdkType = sdkType;
		_sdkVersion = sdkVersion;
		_applicationId = applicationId;
		_applicationType = applicationType;
		_applicationChannel = applicationChannel;
		_applicationVersion = applicationVersion;
		_userId = userId;
		_sessionRestartTime = sessionRestartTime;
		_connectionType = connectionType;
		_isRoaming = isRoaming;
		_operator = operator;
		_operatorName = operatorName;
		_operatorCountryIso = operatorCountryIso;
		_brand = brand;
		_device = device;
		_model = model;
		_product = product;
		_version = version;
		_buildId = buildId;
		_operatorConnectionType = operatorConnectionType;
		_simOperator = simOperator;

		_locationAltitude = locationAltitude;
		_locationLatitude = locationLatitude;
		_locationLongitude = locationLongitude;
		_locationAccuracy = locationAccuracy;
		_locationSource = locationSource;

		_profilePosted = false;

	}

	JSONObject GetDeviceProfile()
	{
		JSONObject returnValue = new JSONObject();
		try
		{
			returnValue.put(BangoFieldNames.POST_SDKTYPE, _sdkType);
			returnValue.put(BangoFieldNames.POST_SDKVERSION, _sdkVersion);
			returnValue.put(BangoFieldNames.POST_CONNECTIONTYPE, BangoStatic.ConnectionType(_connectionType));
			returnValue.put(BangoFieldNames.POST_OPERATORCONNECTIONTYPE, _operatorConnectionType);
			returnValue.put(BangoFieldNames.POST_ISROAMING, _isRoaming);
			returnValue.put(BangoFieldNames.POST_LOCATIONACCURACY, _locationAccuracy);
			returnValue.put(BangoFieldNames.POST_LOCATIONSOURCE, _locationSource);
			returnValue.put(BangoFieldNames.POST_LOCATIONALTITUDE, _locationAltitude);
			returnValue.put(BangoFieldNames.POST_LOCATIONLATITUDE, _locationLatitude);
			returnValue.put(BangoFieldNames.POST_LOCATIONLONGITUDE, _locationLongitude);
			returnValue.put(BangoFieldNames.POST_APPLICATIONID, _applicationId);
			returnValue.put(BangoFieldNames.POST_APPLICATIONCHANNEL, _applicationChannel);
			returnValue.put(BangoFieldNames.POST_APPLICATIONTYPE, _applicationType);
			returnValue.put(BangoFieldNames.POST_APPLICATIONVERSION, _applicationVersion);
			returnValue.put(BangoFieldNames.POST_USERID, _userId);
			returnValue.put(BangoFieldNames.POST_SESSIONRESTARTTIME, _sessionRestartTime);
			returnValue.put(BangoFieldNames.POST_OPERATOR, _operator);
			returnValue.put(BangoFieldNames.POST_OPERATORNAME, _operatorName);
			returnValue.put(BangoFieldNames.POST_COUNTRYISO, _operatorCountryIso);
			returnValue.put(BangoFieldNames.POST_DEVICEBRAND, _brand);
			returnValue.put(BangoFieldNames.POST_DEVICEMAKE, _brand);
			returnValue.put(BangoFieldNames.POST_DEVICEMODEL, _device);
			returnValue.put(BangoFieldNames.POST_SIM, _simOperator);
			returnValue.put(BangoFieldNames.POST_PRODUCT, _product);
			returnValue.put(BangoFieldNames.POST_OPERATINGSYSTEMVERSION, _version);
			returnValue.put(BangoFieldNames.POST_DEVICEVERSION, _model);
		}
		catch (Exception ex)
		{

		}

		return returnValue;
	}

}
